﻿//------------------------------------------------------------
// Copyright (c) Microsoft Corporation.  All rights reserved.
//------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.Xml;

namespace Microsoft.ResourceManagement.Samples.ResourceManagementClient.WSEnumerate
{
    [XmlRoot(ElementName = "PullResponse", Namespace = Constants.NamespaceWSEnumeration)]
    public class PullResponse
    {
        private String enumerationContext;
        private List<XmlNode> items;
        public PullResponse()
        {
            this.EnumerationContext = String.Empty;
            this.items = new List<XmlNode>();
        }

        
        /// <summary>
        /// The opaque string provided by the server to identify the enumeration context
        /// </summary>
        [XmlElement(ElementName = "EnumerationContext", Type = typeof(String))]
        public String EnumerationContext
        {
            get
            {
                return this.enumerationContext;
            }
            set
            {
                this.enumerationContext = value;
            }
        }

        
        /// <summary>
        /// The raw Xml representations of elements
        /// </summary>
        // Exception so the serializer can add and remove elements
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1002:DoNotExposeGenericLists"), XmlAnyElement(Namespace = Constants.NamespaceResourceManagement)]
        public List<XmlNode> Items
        {
            get
            {
                return this.items;
            }
            set
            {
                this.items = value;
            }
        }
    }
}
